// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui'
import Vuex from 'vuex'
//import VueVideoPlayer from 'vue-video-player'
import 'element-ui/lib/theme-chalk/index.css'
import 'video.js/dist/video-js.css' // 引入样式
import 'vue-video-player/src/custom-theme.css' // 引入样式
import 'videojs-flash'
import head from './components/Header.vue'
import footer from './components/Footer.vue'
import cookie from 'vue-cookies'   //引入cookie
Vue.config.productionTip = false
Vue.use(ElementUI)
Vue.use(Vuex)
Vue.component('my-head',head);
Vue.component('my-footer',footer);
import axios from 'axios';
axios.defaults.baseURL="http://localhost:7777/";
//获取设置到cookie中的token
var token= $cookies.get("token");
console.log(token);
axios.defaults.headers={"token":token};
Vue.prototype.$axios=axios;
Vue.prototype.$cookies=cookie;
// Vue.use(VueVideoPlayer,
//    {
//   options: globa default options,
//   events: global videojs events
//  } )
// Vue.config.productionTip = false
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
